package br.com.news.web.service;

import javax.ws.rs.core.MediaType;

import br.com.news.utils.database.beans.AnuncioBean;

import com.google.gson.Gson;
import com.sun.jersey.api.client.Client;

public class AnuncioService {

	public void save(AnuncioBean anuncioBean) {

			Gson g = new Gson();
			String json = g.toJson(anuncioBean);
			Client c = Client.create();
		    c.resource("http://localhost:8080/news-web-service-rest/anuncio/insert").type(MediaType.APPLICATION_JSON).put(json);
	}
}
